﻿using System;

namespace XC.DataAccess.EncoderDecoder
{
    /// <summary>
    /// 编码器
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class EncoderAttribute:Attribute
    {
        public EncoderAttribute(Type? typeConverter, int index)
        {
            TypeConverter = typeConverter;
            Index = index;
        }

        /// <summary>
        /// 类型转换器
        /// </summary>
        public Type? TypeConverter { get; set; }
        /// <summary>
        /// 偏移量
        /// </summary>
        public int Index { get; set; }
        /// <summary>
        /// 长度
        /// </summary>
        public int Length { get; set; }
    }

}
